package com.bootdo.system.controller;

import com.bootdo.app.service.LevelProfitService;
import com.bootdo.common.utils.PageUtils;
import com.bootdo.common.utils.R;
import com.bootdo.system.domain.TbLevelProfit;
import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * @create 2021-03-10 22-06
 */
@Api("会员分润")
@Controller
@RequestMapping("/system/level")
public class LevelProfitController {

    @Autowired
    private LevelProfitService profit;

    @GetMapping("/list")
    @ResponseBody
    public PageUtils selectLevelProfitList(){
        return profit.selectLevelProfitList();
    }

    @PostMapping("/update")
    @ResponseBody
    public R updateLevelProfit(TbLevelProfit profitz){
        return profit.updateLevelProfit(profitz);
    }

    @PostMapping("/add")
    @ResponseBody
    public R insertLevelProfit(TbLevelProfit levelProfit){
        return profit.insertLevelProfit(levelProfit);
    }

    @GetMapping("/delete")
    @ResponseBody
    public R deleteLevelProfit(Long id){
        return profit.deleteLevelProfit(id);
    }

}
